﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Salon
{
    public class Order
    {
        public int Id { get; set; }
        public User Salesman { get; set; }
        public Client Client { get; set; }
        public DateTime OrderDate { get; set; }
        public DateTime PayDate { get; set; }
        public DateTime EndDate { get; set; }
        public decimal Price { get; set; }
        public decimal Cost { get; set; }
        public int State { get; set; }
        public decimal EndPrice { get; set; }
        public int SalonId { get; set; }

        public override bool Equals(object obj)
        {
            Order order = obj as Order;
            if (order == null)
                return false;

            if (this.Id.Equals(order.Id))
                return true;

            return false;
        }

        public override int GetHashCode()
        {
            return Id.GetHashCode();
        }

        public override string ToString()
        {
            return Id.ToString();
        }
    }
}
